import request from "@/utils";
import store from "@/store";
// 注册管理员用户接口
export const AdminRegAPI = ({ username, password }) => {
  return request({
    url: "/api/reguser",
    method: "post",
    data: {
      username,
      password,
    },
  });
};

// 登录管理员账号接口
export const AdminloginAPI = ({ username, password }) => {
  return request({
    url: "/api/login",
    method: "post",
    data: {
      username,
      password,
    },
  });
};

// 获取管理员信息接口
export const getAdminUserInfoAPI = () => {
  return request({
    url: "/my/userinfo",
    headers: {
      Authorization: store.state.token,
    },
  });
};
